//
//  UIColor+Extension.swift
//  FamiliesSchoolConnection
//
//  Created by 花花蔡 on 2016/12/22.
//  Copyright © 2016年 com.HuaHuaCai. All rights reserved.
//

import UIKit

extension UIColor {
    
    
    ///将16进制颜色值装换为颜色对象
    class func colorWithHex(hexColor:uint) -> UIColor {
        //位操作运算获得对应的RGB颜色值
        let r:uint = hexColor >> 16
        let g:uint = hexColor >> 8 & 0xFF
        let b:uint = hexColor & 0xFF
        
        return UIColor(red: CGFloat(r)/255.0, green: CGFloat(g)/255.0, blue: CGFloat(b)/255.1, alpha: 1)
    }

}
